package com.ciwong.epaper.util.KHBVideo;

/**
 * Created by PLA-BYOU on 2017/10/31.
 */
public class KHBVideoPlayerManager
{

    public static KHBVideoPlayer FIRST_FLOOR_JZVD;

    public static KHBVideoPlayer SECOND_FLOOR_JZVD;

    public static KHBVideoPlayer getFirstFloor()
    {
        return FIRST_FLOOR_JZVD;
    }

    public static void setFirstFloor(KHBVideoPlayer KHBVideoPlayer)
    {
        FIRST_FLOOR_JZVD = KHBVideoPlayer;
    }

    public static KHBVideoPlayer getSecondFloor()
    {
        return SECOND_FLOOR_JZVD;
    }

    public static void setSecondFloor(KHBVideoPlayer KHBVideoPlayer)
    {
        SECOND_FLOOR_JZVD = KHBVideoPlayer;
    }

    public static KHBVideoPlayer getCurrentJzvd()
    {
        if (getSecondFloor() != null)
        {
            return getSecondFloor();
        }
        return getFirstFloor();
    }

    public static void completeAll()
    {
        if (SECOND_FLOOR_JZVD != null)
        {
            SECOND_FLOOR_JZVD.onCompletion();
            SECOND_FLOOR_JZVD = null;
        }
        if (FIRST_FLOOR_JZVD != null)
        {
            FIRST_FLOOR_JZVD.onCompletion();
            FIRST_FLOOR_JZVD = null;
        }
    }
}
